home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Browser - Artopolis 97
/
browser.iso
/
mac
/
artrope
/
artrope.dir
/
00006_Script_Cut -n- paste Lingo handlers PC
< prev
next >
Wrap
Text File
|
1997-10-08
|
3KB
|
119 lines
--Cut and paste Lingo handlers
--WinDirs XObject version 1.0, 7/26/96
--Copyright ⌐ 1996 Glenn M. Picher, Dirigo Multimedia
--Email: gpicher@maine.com
--Web: http://www.maine.com/shops/gpicher
--Phone: (207)767-8015 (South Portland, Maine, USA)
--Distribute freely. No licensing required.
--Also distributed by g/matter, inc.
--Email: support@gmatter.com
--Web: http://www.gmatter.com
--Phone: (415)243-0394
-- End user handlers ----------------------------------------------
on getWindowsDirectory
global gWinDirsObject
insureWinDirs()
set theFolder = gWinDirsObject(mWindowsDirectory)
if word 1 of theFolder = "Error:" then
warning "getWindowsDirectory(): " & theFolder
end if
return theFolder
end
on getSystemDirectory
global gWinDirsObject
insureWinDirs()
set theFolder = gWinDirsObject(mSystemDirectory)
if word 1 of theFolder = "Error:" then
warning "getSystemDirectory(): " & theFolder
end if
return theFolder
end
on showWarnings
global gShowWarnings
set gShowWarnings to TRUE
end
on hideWarnings
global gShowWarnings
set gShowWarnings to FALSE
end
-- Support handlers ----------------------------------------------
--These handlers are called from the handlers above.
--You needn't call them directly (although you might wish to
--include openWinDirs() in your startMovie() handler, and
--closeWinDirs() in your stopMovie() handler or final 'quit'
--button.
--Change the pathname or filename in the openWinDirs() handler
--if the XObject is not located in the same place as the
--Director movie or projector. Change closeWinDirs()
--similarly.
on openWinDirs
if xobjectLoaded("WinDirs") then return TRUE
if the machineType >= 256 then
openxlib the pathname & "XTRAS\" & "WINDIRS.DLL"
else
warning "WinDirs is designed only for Windows!"
return FALSE
end if
if not xobjectLoaded("WinDirs") then
warning "WinDirs XObject didn't register."
return FALSE
end if
return TRUE
end
on closeWinDirs
global gWinDirsObject
if objectP(gWinDirsObject) then gWinDirsObject(mDispose)
if not xobjectLoaded("WinDirs") then return TRUE
if the machineType >= 256 then
closexlib the pathname & "XTRAS\" & "WINDIRS.DLL"
else
warning "WinDirs is designed only for Windows!"
return FALSE
end if
if xobjectLoaded("WinDirs") then
warning "WinDirs XObject wouldn't close-- do objects still exist?"
return FALSE
end if
return TRUE
end
on insureWinDirs
global gWinDirsObject
if objectP(gWinDirsObject) then return TRUE
if not openWinDirs() then
warning "insureWinDirs(): openWinDirs() failed"
abort
end if
put WinDirs(mNew) into gWinDirsObject
if not objectP(gWinDirsObject) then
warning "insureWinDirs(): couldn't create object"
abort
end if
return true
end
on xobjectLoaded theName
if not stringP(theName) then
warning "xobjectLoaded(): theName not a string"
return false
end if
return objectP(factory(theName))
end
on warning theMessage
global gShowWarnings
if not (gShowWarnings = TRUE) then return
alert theMessage
end